﻿using System;
using System.Threading.Tasks;
using System.Diagnostics;
using System.Reflection;
namespace ProcessLiveHelper
{
    class Program
    {
        static async Task Main(string[] args)
        {
            if (args.Length == 1)
            {
                var name = Process.GetCurrentProcess().ProcessName;
                if (Process.GetProcessesByName(name).Length != 1)
                {
                    return;
                }

                await Task.Run(()=> ProcessLiveService.Start(args[0]));
            }
        }
    }
}
